#include <app-common/zap-generated/callback.h>
#include <app-common/zap-generated/ids/Clusters.h>
#include <lib/support/Span.h>
#include <protocols/interaction_model/Constants.h>

using namespace chip;

// Cluster Init Functions
void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId)
{
    switch (clusterId)
    {
  {%- for name in clusters | sort(attribute='name') | map(attribute='name') | unique %}
    case app::Clusters::{{name}}::Id:
        emberAf{{name}}ClusterInitCallback(endpoint);
        break;
  {%- endfor %}
    default:
        // Unrecognized cluster ID
        break;
    }
}

{%- for name in clusters | sort(attribute='name') | map(attribute='name') | unique %}
void __attribute__((weak)) emberAf{{name}}ClusterInitCallback(EndpointId endpoint)
{
    // To prevent warning
    (void) endpoint;
}
{%- endfor %}
